function runtest() {
	alert('1');
	var future = new Future(function() {
		sleep(1000);
		alert('2');
	});
	sleep(2000);
	future.result();
	alert('3');
}
function runtest(){var _scope=_frm(this,arguments,[],["future"]);with(_scope){while(1){switch(_cp){case 0:_cp=1;case 1:if((_r.v1=
alert("1"))===_S){return _s();}_cp=2;case 2:if((_r.v2=_new(
Future,


[function(){var _scope=_frm(this,arguments,[],[]);with(_scope){while(1){switch(_cp){case 0:_cp=1;case 1:if((_r.v1=sleep(1000))===_S){return _s();}_cp=2;case 2:if((_r.v2=alert("2"))===_S){return _s();}return;}}}}]))===_S){return _s();}future=_r.v2;_cp=3;case 3:if((_r.v3=
sleep(2000))===_S){return _s();}_cp=4;case 4:if((_r.v4=
future.result())===_S){return _s();}_cp=5;case 5:if((_r.v5=
alert("3"))===_S){return _s();}return;}}}}

/*function fib() {						*/function fib(){var _scope=_frm(this,arguments,[],["i","j","t"]);with(_scope){while(1){switch(_cp){case 0:_cp=1;return _gen(_scope);case 1:
/*  var i = 0, j = 1;						*/i=0,j=1;case 2:
/*  while (true) {						*/_cp=(true)?3:4;break;case 3:_cp=5;
/*    yield i;						*/return i;case 5:_receive;
/*    var t = i;						*/t=i;
/*    i = j;						*/i=j;
/*    j += t;						*/j+=t;_cp=2;break;case 4:return;}}}}
/*  }						*/
/*}						*/
function runtest(){
/*var g = fib();						*/var g=fib();
/*var str = "";						*/var str="";
/*for (var i = 0; i < 10; i++) {						*/for(var i=0;i<10;i++){
/*  str += (g.next() + "<br>\n");						*/str+=(g.next()+"<br>\n");}
/*}						*/
alert(str);
}